Optimal search trees with equality tests
نویسندگان
چکیده
We study the following problem: given a set of keys and access probabilities, find a minimum-cost binary search tree that uses only 2-way comparisons (=, <,≤) at each node. We give the first polynomialtime algorithm when both successful and unsuccessful queries are allowed, settling a long-standing open question. Our algorithm relies on a new structural theorem that proves a conjecture of Spuler [13,14]. We also give a fast approximation algorithm, improved algorithms for special cases, and a counter-example revealing an error in previous works. 1 Background and statement of results We study the problem of finding optimal binary search trees using 2-way comparisons. Given a set K of keys and a query set Q from an ordered universe, and a set C ⊆ {=, <,≤} of binary operators, a (2-way comparison) binary search tree (2wcst) is a rooted binary tree where each internal node has a key in K and an associated operator in C. Given a query value v ∈ Q, a search for v compares v to the key at the root using the root’s comparison operator. If the outcome is yes, the search recurses into the left subtree, otherwise into the right subtree. The search halts when it reaches a leaf. For any v ∈ Q, the outcomes of the comparisons made during the search must suffice to determine the relation of v to every key in K. Fig. 1 gives two examples. v = H? v < O? v < W? yes
منابع مشابه
A Sequent Calculus for a Modal Logic on Finite Data Trees
We investigate the proof theory of a modal fragment of XPath equipped with data (in)equality tests over finite data trees, i.e. over finite unranked trees where nodes are labelled with both a symbol from a finite alphabet and a single data value from an infinite domain. We present a sound and complete sequent calculus for this logic, which yields the optimal PSPACE complexity bound for its vali...
متن کاملOptimal Self-healing of Smart Distribution Grids Based on Spanning Trees to Improve System Reliability
In this paper, a self-healing approach for smart distribution network is presented based on Graph theory and cut sets. In the proposed Graph theory based approach, the upstream grid and all the existing microgrids are modeled as a common node after fault occurrence. Thereafter, the maneuvering lines which are in the cut sets are selected as the recovery path for alternatives networks by making ...
متن کاملThresholds and Optimal Binary Comparison Search Trees
We present an O(n4)-time algorithm for the following problem: Given a set of items with known access frequencies, find the optimal binary search tree under the realistic assumption that each comparison can only result in a two-way decision: either an equality comparison or a less-than comparisons. This improves the best known result of O(n5) time, which is based on split tree algorithms. Our al...
متن کاملChemical Trees with Extreme Values of Zagreb Indices and Coindices
We give sharp upper bounds on the Zagreb indices and lower bounds on the Zagreb coindices of chemical trees and characterize the case of equality for each of these topological invariants.
متن کاملAxiomatizations for downward XPath on Data Trees
We give sound and complete axiomatizations for XPath with data tests by ‘equality’ or ‘inequality’, and containing the single ‘child’ axis. This data-aware logic predicts over data trees, which are tree-like structures whose every node contains a label from a finite alphabet and a data value from an infinite domain. The language allows us to compare data values of two nodes but cannot access th...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1505.00357 شماره
صفحات -
تاریخ انتشار 2015